<?php
class App_Module_Admin_Component_Cfg_Ctrl_Http_Ajax extends Mozg_Controller_Instance
{
    public function newfieldPrAction()
    {
		$groupName = Mozg::Request('http')->get('groupname');
		$fieldName = Mozg::Request('http')->get('fieldname');
		$fieldLang = Mozg::Request('http')->get('fieldlang');
		$fieldParamsPath = Mozg::Request('http')->get('fieldparamspath');

        $obj = Mozg_Entity::Get($fieldParamsPath);

        $response = new stdClass();
        $response->value = $this->GetTpl('Web')->GetFieldInput($groupName, $fieldName, $obj, $fieldLang);
        $response->field = $fieldName;
        	
        Mozg::Response('http')->SetBody($response);
    }
}